home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / logbatch / ifcrc.arc / IFCRC.TXT < prev   
Text File  |  1988-03-18  |  3KB  |  89 lines

  1. Program: IFCRC.EXE / Author: David Bennett / Date: 3-17-88 / Version: 1.0
  2.  
  3. Description:
  4.  
  5.   Compiled using Borland's Turbo Pascal 4.0 compiler.
  6.  
  7.   This program is for use in a batch file.  It allows you to execute commands
  8.   based on whether or not a certain file matches the given CRC value.  The
  9.   program can also be used to check the CRC value of a file.
  10.  
  11.   Although I primarily wrote this program to execute a certain command based
  12.   on whether a file has been altered or not, It could also be used to check
  13.   a daily transfer from a remote site or even used to check for computer
  14.   viruses.
  15.  
  16.   I herby release this program to the public domain (Guilt FreeWare!)
  17.  
  18. Usage:
  19.  
  20.   IFCRC <Filename> {NOT} {Dec/$Hex CRC} {DOS Command} {Dos Command...}
  21.  
  22.   * If only <Filename> is supplied then the CRC for that filename will be
  23.     displayed on the CRT.
  24.  
  25.   * If the NOT operator is specified then the DOS command will be executed if
  26.     the CRC of <Filename> does not match that of the CRC on the command line.
  27.  
  28.   * The CRC will default to a decimal number.  If a '$' preceedes the number
  29.     it will be interpreted as a hexidecimal number.
  30.  
  31. Examples:
  32.  
  33.   IFCRC IFCRC.EXE
  34.  
  35.      This command will return the CRC value of the file IFCRC.EXE in
  36.      Hexdecimal and Decimal notation.
  37.  
  38.   IFCRC WHATSUP.DOC $CD34 TYPE WHATSUP.DOC | MORE
  39.  
  40.      If the CRC of the file WHATSUP.DOC is $CD34 (Hexidecmal) then the file
  41.      will be displayed on the screen one page at a time.
  42.  
  43.   IFCRC HODEE.DOE NOT 12345 ECHO An error has occured!
  44.  
  45.      If the CRC of the file HODEE.DOE does not equal 12345 (Decimal) then an
  46.      error message will be displayed to the screen.  This command will also
  47.      execute is the file HODEE.DOE does not exist!
  48.  
  49. About CRC (Cyclic Redundancy Check):
  50.  
  51.   CRC stands for Cyclic Redundancy Check.  It is based on the CCITT standard
  52.   algorythm: X^16 + X^12 + X^5 + 1.  CRC is used primarily to check file
  53.   transfers to make sure they where made sucessfully.  Some error checking
  54.   protocols (I.E.  Xmodem CRC) do this automattically with each block of data
  55.   transfered.
  56.  
  57.   The CRC of any block of text is a number 16-bit binary number.  This makes
  58.   it very unlikely (1 chance in 65536) that two different files have the same
  59.   CRC value.  Therefore to guard against one of your systems crucial files
  60.   being altered, you can use IFCRC to control processing based on the
  61.   integrity of any file.
  62.  
  63. Error Messages:
  64.  
  65.   Message:                            Description:
  66.   --------------------------          ------------------------------------
  67.   Bad character in CRC value          The given CRC is not a valid number.
  68.                       Check to make sure the proper command
  69.                       line syntax was used.
  70.  
  71.   DOS command expected                IFCRC.EXE could not find a DOS command
  72.                       supplied on the command line. Check
  73.                       syntax.
  74.  
  75.  
  76.   File <filename> not found!          The supplied filename could not be
  77.                       opened. This error will only be
  78.                       displayed when using IFCRC to display
  79.                       the CRC of a given file.
  80.  
  81. The Author:
  82.  
  83.   David Bennett
  84.   Bennett Software Solutions
  85.   151 West Geospace Drive
  86.   Indepedence, MO  64056.
  87.  
  88.   CompuServe ID: 74635,1671
  89.